var select = fl.getDocumentDOM().selection;

if(select.length <= 0){
	alert( "Please make a selection on the stage" );
}else{
	select.reverse();
	var _frame = fl.getDocumentDOM().getTimeline().layers[0].frames[0];
	
	var assigns=[];
	var declarations=[];

	for(var i = 0, name; i < select.length; i++){
		name=select[i].name;
		
		if(name.substr(0, 3)=='btn'){			assigns.push("		var mc_"+name+":Button=mimc.getButton('"+name+"');");
		}else if(name.substr(0, 2)=='tf'){			assigns.push("		var mc_"+name+":TextField=mimc.getTextField('"+name+"');");
		}else{
			assigns.push("		var mc_"+name+":MovieClip=mimc.g('"+name+"');");
		}
	}
	
	fl.outputPanel.clear();
	fl.trace(
		[
			assigns.join('\n')+'\n'
		].join('\n')
	);

}